package huawei.widget;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.core.widget.TextViewCompat;
import o.fkr$d;
import o.fkr$f;
import o.fkr$g;
import o.fkr$i;
import o.fkr$j;
import o.fpx;

public class HwHelpTextLayout extends LinearLayout {
    private EditText ˊ;
    private TextView ॱ;

    public HwHelpTextLayout(Context context) {
        this(context, null);
    }

    public HwHelpTextLayout(Context context, @Nullable AttributeSet attributeSet) {
        this(context, attributeSet, fkr$d.ˊ);
    }

    public HwHelpTextLayout(Context context, @Nullable AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        ॱ(context, attributeSet, i);
    }

    private void ॱ(Context context, @Nullable AttributeSet attributeSet, int i) {
        TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, fkr$i.ʾ, i, fkr$g.ˏ);
        if (fpx.values()[obtainStyledAttributes.getInt(fkr$i.ˋˊ, 0)] == fpx.BUBBLE) {
            inflate(context, fkr$j.ˋ, this);
        } else {
            inflate(context, fkr$j.ˊ, this);
        }
        this.ˊ = (EditText) findViewById(fkr$f.ˏ);
        CharSequence string = obtainStyledAttributes.getString(fkr$i.ˉ);
        CharSequence string2 = obtainStyledAttributes.getString(fkr$i.ˊˊ);
        this.ˊ.setHint(string);
        this.ˊ.setText(string2);
        this.ॱ = (TextView) findViewById(fkr$f.ˋ);
        this.ॱ.setText(obtainStyledAttributes.getString(fkr$i.ˊˋ));
        TextViewCompat.ˎ(this.ॱ, obtainStyledAttributes.getResourceId(fkr$i.ˊᐝ, 0));
        obtainStyledAttributes.recycle();
    }

    public void setText(CharSequence charSequence) {
        this.ˊ.setText(charSequence);
    }

    public void setHint(CharSequence charSequence) {
        this.ˊ.setHint(charSequence);
    }

    public void setHelp(CharSequence charSequence) {
        this.ॱ.setText(charSequence);
    }
}
